import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/baseView'),
    redirect: '/index',
    children: [
      {
        path: 'economic', // 经济
        component: () => import('@/views/economic')
      },
      {
        path: 'classification', // 分类
        name: 'classification',
        component: () => import('@/views/classification')
      },
      {
        path: 'we', // 关于我们
        name: 'we',
        component: () => import('@/views/we/we')
      },
      {
        path: 'index', // 首页
        component: () => import('@/views/index')
      },
      {
        path: 'details',
        name: 'details',
        component: () => import('@/components/details')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
